<?php

namespace app\common\service;

use app\common\exception\Client;
use app\common\model\ExpressTimeline as ExpressTimelineModel;

class ExpressTimeline
{
    const eventType = [
      1 => '入库',
      3 => '预约',
      5 => '出库',
      7 => '送达',
      9 => '签收'
    ];

    /**
     * 创建一个事件节点信息
     * @param $expId
     * @param $evenType
     * @return void
     */
    public function creatEvent($expId,$evenType)
    {
        ExpressTimelineModel::create([
            'express_id' => $expId,
            'event_type' => $evenType,
        ]);
    }
}